<!DOCTYPE html>
<html lang="en">
<head>
    <base th:href="@{/}">
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <title>患者首页</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
</head>
<body >
<!--导航栏 加到IDEA里面单独成一个header.html-->
<header id="header" class="fixed-top" >
    <div class="container d-flex align-items-center">
        <a href="#" class="logo me-auto"><img src="img/logo.png" alt="" class="img-fluid"></a>
        <nav id="navbar" class="navbar order-last order-lg-0">
            <ul>
                <li><a class="nav-link scrollto" th:href="@{user/selectMyMzghByPage?currentPage=1}" data-title="我的挂号">我的挂号</a></li>
                <li><a class="nav-link scrollto" th:href="@{user/appointment}" data-title="挂号">挂号</a></li>
                <li><a class="nav-link scrollto" th:href="@{ai/toChat}" data-title="电子医生">电子医生</a></li>
                <li><a class="nav-link scrollto" th:href="@{/toChat}" data-title="在线咨询">在线咨询</a></li>
                <li><a class="nav-link scrollto" th:href="@{/user/showURecordList}" data-title="就诊记录">就诊记录</a></li>
                <li><a class="nav-link scrollto" th:href="@{/lastedBoardList}" data-title="公告">公告</a></li>
                <li class="dropdown"><a><img th:src="${session.User.tx}" alt="头像" class="img-fluid" style="width: 60px;height: 60px"></a>
                    <ul>
                        <li><a href="/userInfo/toUserInfo">个人信息</a></li>
                        <li><a th:href="@{/auth/logout}">退出登录</a></li>
                    </ul>
                </li>
            </ul>
            <i class="bi bi-list mobile-nav-toggle"></i>
        </nav>
    </div>

</header>
<script src="js/main.js"></script>
<script>
    document.addEventListener('DOMContentLoaded', function() {
        var navLinks = document.querySelectorAll('.nav-link');
        navLinks.forEach(function(link) {
            link.addEventListener('click', function(event) {
                // event.preventDefault();
                var title = link.getAttribute('data-title');
                document.getElementById('pageTitle').textContent = title; // 更新页面标题
                document.getElementById('breadcrumbItem').textContent = title; // 更新面包屑
            });
        });
    });
</script>


</body>
</html>
